package com.opener.web.spring.event;

import org.springframework.context.ApplicationEvent;

/**
 * Created by baboy on 12/12/2016.
 */
public class ActionEvent extends ApplicationEvent {
    private String id;
    private Object data;
    private boolean done = false;
    /**
     * Create a new ApplicationEvent.
     *
     * @param source the component that published the behavior (never {@code null})
     */
    public ActionEvent(Object source) {
        super(source);
    }
    public ActionEvent(String id, Object data){
        super(id);
        this.id = id;
        this.data = data;
    }
    public ActionEvent(Object source, String id, Object data){
        super(source);
        this.id = id;
        this.data = data;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public boolean isDone() {
        return done;
    }

    public void setDone(boolean done) {
        this.done = done;
    }
}
